$(function(){
	$('.toRegist').click(function(event){
		location.href="/admin/regist/singin"
		return false;
	})
	var submit=$(':button[class="layui-btn"]');
	submit.click(function(event){
		var user=$(':text[title][name="user_name"]').val();
		var password=$(':password[title]').val();
		var verify=$(':input[title][name="user_vertify"]').val();		
		$.post('/admin/user/login.json',{user_name:user,UserPassward:password,verify:verify},function(res){
			// console.log(verify)
               if(res.code==1){
                    location.href="/admin/permiss/userlist.html";
               }else{
               	 alert(res.message)
               }
		});
		window.event.returnValue = false;
	});
})